// 汽车类型
var Car = {
    type       : '汽车',
    hasTire    : true
}

// 电动车类型
var ElectricCar = Object.create(Car)
ElectricCar.type = '电动车'
ElectricCar.hasBattery = true //有电池

// 汽油车类型
var GasolineCar = Object.create(Car)
GasolineCar.type = '汽油车'
GasolineCar.hasEngine  = trsue //有发动机

var myCar1 = Object.create(ElectricCar)
myCar1.owner = '白月黑羽'

var myCar2 = Object.create(GasolineCar)
myCar2.owner = '白月黑羽'

console.log(myCar1.hasTire)

console.log(myCar1.toString())